package QL;

import java.util.Map;

public class ButlerCdkeyGroupCodesQueryRequest implements IQLRequest
{
    /// <summary>
    /// 区服Id
    /// </summary>
    public long ZoneId;

    /// <summary>
    /// 激活码分组Id
    /// </summary>
    public long GroupId;

    /// <summary>
    /// -1全部状态 0未使用 1已使用状态 2已废弃
    /// </summary>
    public long FilterStatus;

    /// <summary>
    /// 根据激活码来进行筛选，如果不需要筛选，请留空
    /// </summary>
    public String FilterCode;

    /// <summary>
    /// 根据领取激活码的玩家Id进行筛选，如果不需要筛选，请填0
    /// </summary>
    public long FilterUserId;

    /// <summary>
    /// 是否根据领取时间进行筛选
    /// </summary>
    public boolean IsFilterByFetchedTime;

    /// <summary>
    /// 起始筛选领取时间
    /// </summary>
    public String FilterFetchedTimeBegin;

    /// <summary>
    /// 结束筛选领取时间
    /// </summary>
    public String FilterFetchedTimeEnd;

    /// <summary>
    /// 查询第几页？
    /// </summary>
    public long PageIndex;

    /// <summary>
    /// 每页多少条纪录？
    /// </summary>
    public long PageCount;

    @Override
    public String GetApiName()
    {
        return "butler.cdkey.group.codes.query";
    }

    @Override
    public void Validate()
    {
    }

    @Override
    public void AddParameters(Map<String, String> map)
    {
        map.put("zone_id", String.valueOf(ZoneId));
        map.put("group_id", String.valueOf(GroupId));
        map.put("filter_status", String.valueOf(FilterStatus));
        map.put("filter_code", FilterCode);
        map.put("filter_user_id", String.valueOf(FilterUserId));
        map.put("is_filter_by_fetched_time", IsFilterByFetchedTime ? "True" : "False");
        map.put("filter_fetched_time_begin", FilterFetchedTimeBegin);
        map.put("filter_fetched_time_end", FilterFetchedTimeEnd);
        map.put("page_index", String.valueOf(PageIndex));
        map.put("page_count", String.valueOf(PageCount));
    }
}
